Method and apparatus for analyzing an image to detect and identify defects

ABSTRACT

The Invention includes a method and apparatus which analyzes an image of an object to detect and identify defects in the object. The present invention utilizes a scanning technique which converts a 2-D image of the object into a 1-D image, a transformation technique which extracts relevant features from the image, and a fuzzy inferencing technique which utilizes the features generated by the transformation technique to detect and identify defects. The present invention preferably includes an off-line learning process which selects the optimum transform coefficients for a given set of defects and stores the corresponding features in a rulebase. Preferably, the wavelet transform is used as the transformation technique to provide an analysis of the image which is localized in the frequency and time domains. The present invention may also include an on-line learning process when the present invention is incorporated into a manufacturing process for real time inspection of the object being manufactured. The on-line learning process attempts to nullify the effects of noise which may be associated with the image sensors being used to read the image by using a similarity function to maintain a predetermined level of fuzziness of the inference engine of the present invention.

BACKGROUND OF THE INVENTION

1. Technical Field of the Invention

The present invention provides a method and apparatus for analyzing animage to detect and identify defects and, more particularly, to a methodand apparatus which combines fractal scanning, wavelet transformation,fuzzy logic and off-line and on-line learning to provide a robust faultdetection and identification (FDI) system which detects and identifiesfaults or defects in an object being manufactured or processed, such astextiles, glass, lumber, pulp, metals, paper, food, etc., and whichcontrols the manufacturing or processing in accordance with the types ofdefects identified to eliminate or minimize the defects.

Fault detection and identification (FDI) is an important part of moderncontrol strategy. FDI algorithms generally consist of two portions,namely, a detection portion and an identification portion. Faultdetection is the process of deciding whether any one of the anticipatedfaults or defects has occurred. Once the presence of the defects hasbeen established, fault identification distinguishes which particulardefect has occurred. There are a number of systems where traditional FDItechniques are not applicable due to the unavailability of analyticmodels. FDI becomes more difficult when there is a large variation insignal time constants. A high degree of system interdependencies,process and measurement noise, large-grain uncertainty and randomnessmake FDI even more challenging. The present invention provides an FDIalgorithm for such systems. With these types of systems, proper signalanalysis is of primary importance. Analysis only in the time orfrequency domains generally is not sufficient to capture the faults thatoccur over a wide band of frequencies. Analysis of these types of faultsshould be localized in both the time and frequency domains. For thisreason, the present invention proposes using a transform known as thewavelet transform which is an excellent signal analysis anddecomposition tool for such systems because it provides an analysiswhich is localized in both the frequency and time domains.

In view of the behavior of these types of systems, the present inventionproposes a solution which combines wavelet transform and fuzzyinferencing techniques. This novel arrangement, hereinafter called FuzzyWavelet Analysis (FWA), provides a system capable of analyzing the faultsignatures in a time(or space)/frequency localized manner with theability to accommodate uncertainty. Preferably, on-line and off-linelearning are implemented by the present invention for maximizing theperformance of the FDI system of the present invention. Development ofFWA as an intelligent paradigm provides on-line adaptability and FDIprocess improvement through learning. The off-line learning process ofthe present invention is achieved by maximizing the detectability andidentifiability measures, which can be calculated from analytic formulasand which are the primary constraints for designing knowledge-basedsystems. The on-line learning process of the present invention involvesparametric adjustment of the fuzzification process so as to minimize thesensitivity of the FDI system to noise. Thus, a new similarity measureis defined which has a nonlinear adjustment of the input sensitivity.

The FWA of the present invention generally involves analysis of 1-Ddata. However, it can be applied to 2-D images by using specializedscanning techniques at the preprocessing stage. Analysis of images forthe purpose of FDI requires information in both the horizontal andvertical directions to acquire maximum information about the features inthe image. However, analysis in 2-D is computationally intensive andtime consuming. Hence, a better approach is to scan the image into a 1-Dstream of data. Unfortunately, commonly used scanning techniques whichscan the image into a 1-D data stream, such as raster scanning, do notpreserve the adjacency of the features in the direction perpendicular tothe direction of scanning. Feature extraction for FDI is easier in 1-Dscanning techniques that retain the neighborhood relationship of theimage. Thus, a technique that scans one area of the image completelybefore moving to the next area is desirable. In accordance with thepresent invention, a fractal scanning technique is used which is muchmore efficient at capturing features in digital images than otherscanning techniques.

2. Prior Art

Current trends in industrial and manufacturing automation have placed anincreased emphasis on the need for quality and reliability, both in theprocess control and product characterizations areas. As the technologiesare becoming more complicated, failure free and reliable processes arebecoming vital. Automatic control systems are becoming more complex asthey are called upon to regulate critical dynamic systems and theassociated control algorithms and control actuators entail moresophistication. Consequently, there is a growing demand for faulttolerance, which can be achieved not only by improving the reliabilityof the functional units but also by efficient FDI concepts. Faultdetection and identification is of interest in a wide variety ofapplications such as control systems, image analysis, analysis of radarsignals, smart sensors, texture analysis, medicine, industry, etc.

From the perspective of product characterization, one aspect of qualityis perceived as a defect-free final product. Product inspection anddefect classification is one of the key issues in the manufacturingarena. Manual inspection or traditional signal processing have proven tobe inadequate in many applications. This is due to the presence of ahigh degree of uncertainty and complexity in these systems. Intelligentprocessing tools like fuzzy logic, neural networks and intelligentoptimization techniques are currently being used which accommodate largegrain uncertainty while utilizing all the information about the systemwhen the information from analytic models of the system is not adequate.This gives intelligent FDI schemes an advantage over conventional FDItechniques, which rely primarily on analytic models. However, heretoforesuch systems have been analyzed in the time and/or frequency domains.Due to the wide range of time constants, analysis of such systems in thefrequency domain alone would mask the sudden bursts of high frequency.Unless the frequency domain resolution is very fine, slowly varyingfault features can be masked in the dc bias. Likewise, analysis in thetime domain would not reflect the periodicity of the features. Hence,analysis only in the frequency or time domain generally is notsufficient to capture features that are spread in a wide band offrequencies. In accordance with the present invention, this problem isovercome by using Wavelet Transform (WT) techniques which provide ananalysis which is localized in both the frequency and time domains. WTuses a variable window size to analyze different frequencies. Moreover,it provides a wide choice of wavelets for providing the best fit for agiven application.

Over the last two decades, basic research in FDI has gained increasedattention, mainly due to trends in automation, the need to addresscomplex tasks, and the corresponding demand for higher availability andsecurity of the control systems. However, a strong impetus has also comefrom the side of modern control theory that has brought forth powerfultechniques in mathematical modeling, state estimation and parameteridentification.

In general, FDI schemes can be classified broadly as: (1) model basedFDI techniques; and (2) knowledge based FDI techniques. Model-basedtechniques (analytic) generally use the information of the statevariables from the model of the system to predict the future values. Adisparity between the actual values and the predicted values suggests apossible fault. This is a very robust approach to FDI for systems whereaccurate models are available. Knowledge-based approaches provide a veryuseful alternative in systems where accurate models are not available.

Model-based FDI techniques have been thoroughly tested and verified toperform satisfactorily in many applications. Based upon the methods ofusing the model, various approaches have been developed. For example,innovation-based techniques, such as Generalized Likelihood Ratio, areused for linear stochastic systems. This technique requires N+1hypothesis testing: H_(i) for the occurrence of fault i, i=1, . . . , N,and H_(o) for no failure. The failure decision is based upon the maximumlikelihood ratio of the conditional probabilities for H_(i) and H_(o). Atechnique known as the Failure Sensitive Filters technique employs aclass of filters wherein the primary criterion for the choice of thefilter is that the effects of certain faults are accentuated in thefilter residue. However, it is not always possible to design a filterthat is sensitive only to a particular fault. Furthermore, a performancetrade off is inherent in this method; as the sensitivity of the filterto new data is increased, by effectively increasing the bandwidth of thefilter, the system becomes more sensitive to sensor noise and theperformance of the detection algorithm under no-failure conditionsdegrades.

Another technique known as the Multiple Hypothesis Filter Detectorstechnique uses a bank of filters (one for each fault mode) and eachfilter is used to calculate the conditional probability that eachfailure mode has occurred. This technique generally is not very populardue to its level of complexity, which increases exponentially as thesystem expands.

The Parity Space Approach exploits the inconsistency of data (due tofailure) coming from different sources of the system. The DirectRedundancy or Hardware Redundancy technique uses the instantaneousvalues of different sensors while the Temporal Redundancy technique usesa dynamic relationship between sensor outputs and actuator inputs over aperiod of time. The Hardware Redundancy technique is simple and easy toapply. However, it requires multiple sensors for each variable. Anotherdrawback of this technique is that it works on the assumption that onlyone sensor fails at a time (in a three sensor arrangement). AnalyticRedundancy uses data from sensors representing different parameters ofthe system that can be mathematically related by the model or part ofthe model.

With the availability of mathematical and computational tools, the trendin FDI research has shifted toward analytical (i.e., functional) ratherthan physical redundancy. This implies that the inherent redundancycontained in the dynamic relationships among the system inputs andmeasured outputs is exploited for FDI. In such approaches, one makes useof a mathematical model of the system or models describing certainmodules of the overall system.

All of the known techniques described above utilize a model of thesystem (or part of the system) for fault analysis. These techniques worksatisfactorily as long as the model characteristics approximate theactual system. However, their performance degrades rapidly if the modeldoes not closely represent the actual system. Unfortunately, accuratemodels are not available for most systems. There is a growing potentialfor using knowledge-based models and algorithms instead of analyticones. This approach is, of course, the only one available in cases whereanalytic models are not available. A comparison of a model-basedtechnique and a knowledge-based technique is shown in FIG. 1. It can beseen in FIG. 1 that the knowledge base replaces the model in the overallarchitecture. This knowledge-based approach has created a new dimensionof possible fault diagnosis techniques for complex processes withincomplete process knowledge. Whereas the analytic methods usequantitative analytical models, the expert systems approach makes use ofqualitative models based on the available knowledge of the system.Although the intelligent FDI techniques do not require an accurateanalytic model, they are restricted to identification of onlypredetermined defects. This is, however, acceptable in many cases as thefault modes in most applications are already known.

Most of the intelligent techniques being used today employ a learningmechanism (on-line or off-line) which uses information obtained from anexpert, historical data, extrinsic conditions, etc. The learningprocedure, in most cases, is cast as an optimization problem whichadjusts the parameters of the detection algorithm, modifies theknowledge-base, initiates mode switching, etc. For example, it is knownto use learning to determine the optimum weights for aggregation ofinformation from different sources for vibration monitoring. Neural-netbased FDI techniques are known which use learning to adjust the weightsof individual neurons. Fuzzy Associative Memories (FAMs) are known whichemploy learning to design an inferencing hypercube.

The fault identification problem is in fact the classification of faultsinto different categories. It may be viewed as a mapping from thefeature space to the decision space. One well known fuzzy classificationroutine is the Fuzzy C-Means (FCM) algorithm derived from its crispversion called ISODATA. Consider the partitioning of the set X={x₁, x₂,. . . , x_(n) } into c-partitions, c.di-elect cons.N. FCM assigns adegree of association μ_(ik) of the kth feature with the ith partition(fault mode in our case). For the cluster center τ_(i) of the ithcluster, FCM estimates μ_(ik) as follows ##EQU1##

These types of approaches work on the assumption that the fuzzy classesare fully understood by the user and that there exists sufficientknowledge of the associated features. They do not allow the classes tobe self generated or evolved over time. Hence, they lack the element oflearning that would enable the system to work independently without userassistance.

It is also known to use a multi-level architecture for classificationtools based on fuzzy logic. The highest level is the application level,the middle level provides the definition of a language for thespecification and reasoning, and the lowest level contains theelementary data structure definition and operators for classificationand reasoning.

Other popular methods for classification use a fuzzy rule-base, a fuzzydecision hypercube and fuzzy relational matrix. All of these techniquesrely upon the user to provide the expert knowledge for the inferenceengine. Unfortunately, the generation of a fuzzy decision hypercube orFAM is not very simple for most applications.

The FWA technique of the present invention attempts to overcomeshortcomings of the existing methods of fault detection andidentification. This technique provides a unified platform for processfault diagnosis and product characterization. Prior to performing FWA,the present invention implements fractal scanning which converts 2-Dimage information into a 1-D data stream by scanning the image infractal patterns. The wavelet transform is then applied to provide ananalysis of the image which is localized in both the time and frequencydomains. The FWA technique then utilizes the fault features generated bythe wavelet transforms to detect and identify defects and optimizesfeatures extracted from the various faults for use in theknowledge-base. This requires off-line learning. Preferably, bothoff-line and on-line learning are implemented by the FDI system of thepresent invention.

In accordance with a preferred embodiment of the present invention, FWAis applied in real time to a textile manufacturing process to detect andidentify faults occurring in textile fabrics being manufactured and tocontrol the textile manufacturing process to eliminate or minimize thefaults.

BRIEF SUMMARY OF THE INVENTION

In accordance with the present invention, a method and apparatus isprovided which analyzes an image of an object to detect and identifydefects in the object. The present invention utilizes a scanningtechnique which converts a 2-D image of the object into a 1-D image, atransformation technique which extracts relevant features from thescanned image, and a fuzzy inferencing technique which utilizes thefault features generated by the transformation technique to detect andidentify defects. The present invention preferably includes an off-linelearning process which selects the optimum transform coefficients for agiven set of defects and stores the corresponding features in arulebase. Preferably, the wavelet transform is used as thetransformation technique to provide an analysis of the image which islocalized in the frequency and time domains. The present invention mayalso include an on-line learning process when the present invention isincorporated into a manufacturing process for real time inspection ofthe object being manufactured. The on-line learning process attempts tonullify the effects of noise which may be associated with the imagesensors being used to read the image by using a similarity function tomaintain a predetermined level of fuzziness of the inference engine ofthe present invention.

Accordingly, it is an object of the present invention to provide arobust fault detection and identification system.

It is another object of the present invention to provide a faultdetection and identification system which combines fractal scanning, awavelet transform technique and fuzzy logic to extract fault featureswhich are used to detect and identify defects and which are optimizedfor use in a knowledge-base for off-line learning.

It is yet another object of the present invention to provide a faultdetection and identification system which can be incorporated as part ofa manufacturing line for real time detection and identification ofdefects occurring in an object being manufactured and for controllingthe manufacturing process to improve the production quality of theobject being manufactured.

It is yet another object of the present invention to provide a faultdetection and identification system which combines fractal scanning, awavelet transform process, fuzzy logic and off-line and on-line learningto provide a robust fault detection and identification system whichmaximizes defect detection and identification while minimizing falsedetection of defects.

It is yet another object of the present invention to provide anintelligent fault detection and identification system which can beincorporated into a textile fabric manufacturing process for detectingdefects in fabric being manufactured and for controlling themanufacturing process to eliminate or minimize defects in the fabric.

It is yet another object of the present invention to provide a robustfault detection and identification system which is economical.

These and other objects of the present invention will become apparentfrom the following description, drawings and claims.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is a block diagram comparing model-based FDI techniques toknowledge-based FDI techniques.

FIG. 2 illustrates the nested hierarchy of a two-level fractal.

FIG. 3 illustrates a complete fractal scan over an image of a carpet.

FIG. 4 illustrates the advantages of fractal scanning over rasterscanning for fault detection.

FIG. 5a illustrates the preferred basic fractal of the presentinvention.

FIG. 5b illustrates the 5×5 dimension of the fractal of FIG. 5a.

FIG. 6 illustrates different orientations of basic fractals.

FIG. 7 illustrates an example of a wavelet having different scalefactors.

FIG. 8 is a block diagram of the Fuzzy Wavelet Analysis of the presentinvention.

FIGS. 9a and 9b illustrate problems with using calculus-based methods toselect optimum wavelet scales.

FIG. 10 illustrates a noisy signal for which calculus-based methodswould be unsuitable for selecting optimum wavelet scales.

FIG. 11 is a table showing the results of using Roulette Wheel ParentSelection for implementing the genetic algorithm preferably used in theoff-line learning module of the present invention.

FIG. 12 illustrates examples of two-point crossover of the geneticalgorithm.

FIG. 13 is a table containing calculations relating to detectabilitywhich are made by implementation of the genetic algorithm.

FIG. 14 lists particular types of defects which commonly occur duringthe manufacture of textiles.

FIG. 15 illustrates a preferred embodiment of the FDI system of thepresent invention for detecting defects in textile fabrics.

FIG. 16 illustrates an alternative embodiment of the FDI system of thepresent invention for detecting defects in textile fabrics.

FIG. 17 illustrates an alternative embodiment of the FDI system of thepresent invention for detecting defects in textile fabrics.

FIG. 18 illustrates a block diagram of the FDI system of the presentinvention in accordance with the preferred embodiment.

FIG. 19 is a flow chart of the fractal scanning process of the presentinvention in accordance with the preferred embodiment.

FIG. 20 is a flow chart showing fuzzification, fuzzy inferencing, defectdetection and defect declaration in accordance with the presentinvention.

FIG. 21 is a flow chart of the genetic algorithm of the presentinvention implemented by the off-line learning module.

FIG. 22 is a flow chart of the on-line learning module of the presentinvention.

FIG. 23 graphically illustrates the convergence of the objectivefunction in accordance with the learning process of the presentinvention.

FIG. 24 shows certain types of defects in textile fabrics detectedduring an experimental run of the present invention.

FIGS. 25-28 illustrate wavelet coefficients used during the experimentalrun to detect defects.

FIG. 29 illustrates the results of the experimental run.

DETAILED DESCRIPTION OF THE INVENTION

As stated above, the present invention preferably combines fractalscanning, a wavelet transform process, fuzzy logic and on-line andoff-line learning to provide a robust fault detection and identification(FDI) system. Therefore, each of these components will be discussed indetail separately. Finally, a discussion will be provided of thepreferred embodiment of the present invention wherein the fuzzy waveletanalysis (FWA) of the present invention is applied to textile fabricinspection.

1. Fractal Scanning

The FWA of the present invention generally involves analysis of 1-Ddata. However, it can be applied to 2-D images by using specializedscanning techniques at the preprocessing stage. Analysis of images forthe purpose of FDI requires information in both the horizontal andvertical directions to acquire maximum information about the features inthe image. However, analysis in 2-D is computationally intensive andtime consuming. Hence, a better approach is to scan the image into a 1-Dstream of data. Unfortunately, commonly used scanning techniques whichscan the image into a 1-D data stream, such as raster scanning, do notpreserve the adjacency of the features in the direction perpendicular tothe direction of scanning. Feature extraction for FDI is easier in 1-Dscanning techniques that retain the neighborhood relationship of theimage. Thus, a technique that scans one area of the image completelybefore moving to the next area is desirable. In accordance with thepresent invention, a fractal scanning technique is used which is muchmore efficient at capturing features in digital images than otherscanning techniques.

Fractal scanning is very suitable for the purpose of fault detectionbecause of the inherent scaling and nesting properties of fractals. Thefollowing attributes of fractal scanning make it ideal for thisapplication: (1) fractal scanning is nested recursively in a selfsimilarity manner; (2) it moves in all directions of interest within thelowest dimension of the image; (3) it preserves the adjacency of theimage features in all directions; (4) it is scaleable to the requiredresolution due to the fractional dimension; (5) it allows for asubstantial reduction in data; (6) it assists in reducing the amount ofcalculations; and (7) it enables the availability of 1-D instead of 2-Ddata.

Unfortunately, thus far none of the studies involving fractal scanninghave given a systematic and organized algorithm for generating thefractal scan. In accordance with the present invention, a detailedmathematical representation of a fractal scanning technique has beendeveloped and is presented here which provides a very reliable andefficient scanning technique for fault detection.

The ability of the fractal scan to capture the faults of smallestdimension comes from the self similarity nesting property of thefractals. Each fractal is composed of self similar fractals of smallersize and so on. The recursion continues until the size of the fractal iscomparable to the size of the smallest anticipated fault. The nestedhierarchy of a two level fractal is shown in FIG. 2. The final fractalis one continuous line whose length depends upon the dimension of thefractal. An example of the complete fractal scan over the image of acarpet is shown in FIG. 3.

As mentioned above, the fractal scanning technique preserves theneighborhood relationship in an image. The intricate geometry of afractal provides the liberty to scan less than the total number ofpixels without loss in detectability of the methodology. This introducesthe scale factor s which represents the number of pixels omitted betweentwo lines. The problem with conventional scanning, such as rasterscanning, is that it can completely miss a fault feature in thehorizontal direction if the dimension of the fault in the verticaldirection is less than s. On the other hand, if a fault occurs in thevertical direction, the vertical adjacency of the feature is lost as thescan goes all the way to the end of the image and comes back to read thefeature again. Hence, a very critical sequence of pixel intensities canbe lost as these pixels occur too far apart in the data stream. Both ofthese scenarios are shown in FIG. 4. It can be seen from FIG. 4 that thelikelihood of missing a fault is low when using the fractal scanningtechnique. Moreover, the proximity relationship is better retained ascompared to the conventional scanning techniques. The fractal scancrosses the fault at a number of places which are in close proximity toeach other.

FIG. 5a illustrates the preferred basic fractal used for this algorithm.It will be apparent to those skilled in the art that fractals differentfrom the one shown here can also be used depending upon the nature ofthe application. This shape of the fractal is particularly suited fortextile fabric inspection due to the orthogonal nature of the faults intextile fabrics, to which FWA is applied in accordance with thepreferred embodiment.

To provide an example of a mathematical representation of the fractal, abasic fractal is resolved over a 5×5 grid as shown in FIG. 5b. Each boxon the grid is itself a similar fractal repeating itself with adifferent orientation, θ, given by the direction of the arrow. It isseen that the fractal in FIG. 5a starts from the top left corner andends at the top right corner. The net displacement can be represented bythe direction vector (1,0). Hence the orientation of this fractal is atan angle of 0 radians. It can be seen that the orientation of thesub-fractals in FIG. 5b is one of the following angles: ##EQU2## Therepresentation n=4, 5, . . . are mapped back to the principal argument(n=0, 1, 2, 3). Therefore the definition of only these four orientationsis necessary to accomplish the connectivity of the whole fractal.

Let a fractal be represented by f^(r) _(n),, where r=0, 1, 2 . . . , L,is the level of the fractal in the nested hierarchy. L is the totalnumber of levels. A larger value of r represents a fractal of largerphysical dimension. n.di-elect cons.{0, 1, 2, 3} represents theorientation of the fractal given by the angle nπ/2. The nestedarrangement for a fractal with orientation n and level r is given by anordered set as shown below:

    f.sub.n.sup.r =(f.sub.n.sbsb.1.sup.r-1, f.sub.n.sbsb.2.sup.r-1, f.sub.n.sbsb.3.sup.r-1, . . . , f.sub.n.sbsb.K.sup.r-1)   Equation 1

where n₁, . . . , n_(k) are the orientation for sub-fractals in thesequence they are connected and K is the number of sub-fractals in onefractal (25 in this case).

The orientation of the sub-fractals for the basic fractal are obtainedfrom FIG. 5b. Starting from the top left corner, the first box has anorientation of ##EQU3## Hence the first subfractal of the basic fractalf^(L) ₀ is f^(L-1) ₃. Moving along in the direction of the arrow, thenext box is also pointing down which refers to f^(L-1) ₃. Continuing thesame argument, the third and the fourth subfractals have the samedirection and the fifth one has direction 0. This implies a sub-fractalf^(L-1) ₀. Likewise, completing the directions of all the 25sub-fractals, the representation of the basic fractal becomes: ##EQU4##For simplicity, the fractals are associated with direction set θ. Forthe basic fractal, the direction set is given as:

    θ.sub.o =(3,3,3,3,0,0,0,0,0,1,1,2,2,2,0,3,3,2,1,1,1,1,0,0,0)Equation3

The elements of the direction set θ_(n) are represented by ξ^(n) _(i).di-elect cons.{0, 1,2,3}, and are related to the direction θ.sub.ξi ofa sub-fractal by: ##EQU5##

Once the representation of the basic fractal is complete, fractals withother orientations can be generated. As stated above, only fourorientations, given by ##EQU6## are required. All these orientations canbe derived from the basic fractal. In general, a mapping from anyorientation to another one can be calculated. For (m,n)=(0,1), (1,0),(2,3), (3,2),f_(o) ⃡f₁, f₂ ⃡f₃ are reflections across the line y=x inthe xy-plane. If ##EQU7## is the angle at which a fractal is oriented,represented by (cos θ_(n) sin θ_(n)), then mapping f^(r) _(n) →f^(r)_(m) is given by: ##EQU8## Similarly the transformation for (m,n)=(1,2),(2,1), (3,0), (0,4), respectively, is the reflection across the liney=-x. The transformation matrix is ##EQU9##

The transformation for (m,n)=(0,2), (2,0), (1,3), (3,1), respectively,is two successive reflections shown above. The transformation matrix inthis case is ##EQU10## Combining the conditions of Equations 4, 5 and 6,we arrive at: ##EQU11## where ξ^(m) _(i) .di-elect cons.θ_(m) and ξ^(n)_(i) .di-elect cons.θ_(n). The mapped orientations of the directionsets, θ₁, θ₂, θ₃ from 74 ₀ are as follows:

    θ.sub.1 =(2,2,2,2,1,1,1,1,1,0,0,3,3,3,1,2,2,3,0,0,0,0,1,1,1)Equation 10

    θ.sub.2 =(1,1,1,1,2,2,2,2,2,3,3,0,0,0,2,1,1,0,3,3,3,3,2,2,2)Equation 11

    θ.sub.3 =(0,0,0,0,3,3,3,3,3,2,2,1,1,1,3,,0,0,1,2,2,2,2,3,3,3)Equation 12

These four orientations are shown in FIG. 6. The smaller boxes representthe nested fractals with their individual orientations.

Two fractals of particular orientation can be connected to form acontinuous line by a unique link. The direction of a link between ξ_(i)and ξ_(j) is given by d(ξ_(i), ξ_(j)), ##EQU12## where ##EQU13##represents the integral part of the fraction. This directional link isshown by the arrows between the boxes in FIG. 5b. The directional linkis essential for the physical connectivity of the scan.

In accordance with the present invention, a marked increase in theefficiency of the fault detection algorithm has been obtained by usingfractal scanning. The increase in performance is as follows: (1) fractalscanning reduces both the amount of data and the calculation effort; (2)for a scale factor of 2, data is immediately reduced to one-half, (3) asan example, detection of an edge in a 2-D image using a Sobel operatorrequires 9+9=18 multiplications and 2 additions; a similar edgedetection that employs a fractal scan requires 3 multiplications and 1addition; (4) recursive algorithms for a fractal scan results inincreased efficiency, and (5) the 1-D data provide information aboutboth the horizontal and the vertical directions.

2. Wavelet Transform

Wavelet theory provides a unified framework for a number of techniqueswhich had been developed for various signal analysis and processingapplications. Wavelet Transform (WT) is of interest as it provides analternative to the classical Short Time Fourier Transform (STFT) andGabor Transform for non-stationary signal analysis. The basic differenceis that, in contrast to STFT, which uses a single analysis window, theWT uses short windows at high frequencies and a long window at lowfrequencies. This is the essence of the so-called "constant-Q" orconstant relative bandwidth frequency analysis. Basis functions, calledwavelets, are the underlying element of the wavelet analysis. They areobtained from a single prototype wavelet by dilations and compressions(scalings) as well as shifts. The prototype wavelet can be thought of asa bandpass filter, and the constant-Q property of the other band-passfilters (wavelets) follows because they are scaled versions of the sameprototype. The prototype is often called the mother wavelet. Therefore,in WT, the notion of scale is introduced as an alternative to thefrequency, leading to the so-called time-scale representation. Thismeans that the signal is mapped to a time-scale plane (the equivalent ofthe time-frequency plane in STFT).

The objective of feature extraction is to extract relevant informationfrom a signal by transforming it. Some transform methods makeassumptions about the signal to be analyzed. This may yield sharpresults if these assumptions are valid. One such assumption is that thesignal is stationary, that is, its properties do not evolve over time.For such signals x(t), the natural stationary transform is thewell-known Fourier Transform. However, an abrupt change in the signalx(t) in time would spread over the whole frequency axis in X(ω)), ifanalyzed via Fourier transform methods. Therefore, an analysis adaptedto non-stationary signals requires more than the Fourier Transform.

The usual approach is to introduce time dependency in the Fourieranalysis while preserving linearity. The idea is to introduce localfrequency (local in time) or instantaneous frequency parameters so thatthe local frequency looks at the signal through a window in time overwhich the signal is fairly stationary. This is the basis for the wellknown STFT. One drawback of the STFT is the limitations of the STFT withrespect to discriminating between two pure sinusoids. Two sinusoids canonly be discriminated if they are more than Δω apart in the frequencydomain. Thus, the frequency resolution of STFT is given by Δω.Similarly, two pulses can only be discriminated in time if they are Δtapart. The resolution cannot be improved in both time and frequencysimultaneously, because their product is bounded: ##EQU14## Thus,different features in the signal can be analyzed with good timeresolution or frequency resolution, but not both.

To overcome the resolution limitation of STFT, the resolutions of Δt andΔω can be varied in the time-frequency plane in order to obtainmultiresolution analysis. Intuitively, the time resolution of theanalysis must increase (Δt must decrease) as the analysis frequencyincreases. Since Δt and Δm are inversely related, this implies that Δωbe proportional to ω. That is: ##EQU15## where c is a constant. Hencethe analysis has a constant bandwidth relative to the frequency. This isthe essence of the well known wavelet analysis which is achieved byusing a short window (compressed wavelet) for analyzing higherfrequencies and a long window (dilated wavelet) for analyzing lowerfrequencies. The scale factor in the wavelets thus becomes analogous tothe frequency of STFT, with added control over time-frequency resolutionin the case of WT.

The wavelet transform is well known in the art and is not, in and ofitself a novel aspect of the present invention. However, the waveletanalysis in combination with the other components of the presentinvention is one of the novel aspects of the present invention.Therefore, a brief discussion of the mathematical basis of the wavelettransform is given below to provide a background which will be useful inthe subsequent discussion of the Fuzzy Wavelet Analysis of the presentinvention

Let x(t).di-elect cons.E L² (R) be the signal to be analyzed. Let a,b.di-elect cons.R, where a is a scaling factor and b is translation intime. A family of signals is chosen, called wavelets {Ψ_(a),b }.di-elect cons.L² (R), for different values of a and b given by##EQU16## where Ψ(t) is called the mother wavelet and should satisfy thefollowing property: ##EQU17## where ψ(ω) is the Fourier Transform ofΨ(t). Equation 15 is called the admissibility condition for the motherwavelet and is satisfied when ψ(0)=0. In other words ##EQU18## Anothercondition on the wavelet is that its time-bandwidth product should berelatively small. This is to ensure the time/frequency localizationproperty of the wavelet transform. Typically, a mother wavelet is alocalized sinusoid. An example of a wavelet Ψ(t)=e⁻¹.spsp.2 cos 7t withscale factor a=1,0.5, . . . , 0.25 is shown in FIG. 7.

The coefficients for the WT for some a and b are defined as the innerproduct in L² (R) of x(t) and Ψ_(a),b (t) as ##EQU19## The signal x(t)can be recovered from its wavelet transform via the known resolution ofthe identity as follows ##EQU20##

For the discrete case the wavelet coefficients are obtained as:##EQU21## where N is the number of samples for which Ψ_(a),b (j)≠0.

Now that the characteristics of the wavelet transform have beenfully-discussed, the implementation of the wavelet transform in thecontext of the FWA of the present invention will now be discussed.

3. Fuzzy Wavelet Analysis (FWA)

The Fuzzy Wavelet Analysis of the present invention, described in detailbelow, capitalizes on tools such as fuzzy logic, possibility theory,multiresolution wavelet transform, time/frequency analysis and fractalscanning for providing a robust fault detection and identificationscheme. The object of FWA is to use the fault features generated by thewavelet transforms to detect and identify defects. The input signal tothe FDI system first undergoes preprocessing and then features areextracted using the wavelet transform. The features are fuzzified and aninference engine uses the knowledge-base to generate decisions. Thefuzzification process of the present invention adapts dynamically to theexternal disturbances so that the performance can be improved. Thedetailed description of these units is given below.

a. Preprocessing

The input signal x(t) is converted into a stream of 1-D data by thefractal scanning algorithm. This data, as shown in FIG. 8, undergoespreprocessing 10 in order to reduce the noise content and increaseusability. It will be apparent to those skilled in the art that variouspreprocessing techniques can be applied which depend upon the particularapplication of the FDI system of the present invention. Thepreprocessing techniques may vary from simple averaging to varioussignal processing algorithms. However, in the case of analysis of 2-Dimages, the data must be converted first to 1-D data stream as mentionedabove. Thus in each case (1-D or 2-D) the final signal x(t) is a 1-Ddata stream. The input signal x(t) is sampled at regular intervals toobtain the sampled signal x(j), j.di-elect cons.N. Preliminaryadjustments are made at this stage to obtain a uniform mean and varianceof the- signal. This is helpful in suppressing external variations andsensor imperfections, and is achieved by an on-line learning system thatis explained in detail below.

b. Feature Extraction

As shown in FIG. 8, FWA employs the wavelet transform (WT) usingdifferent wavelet functions 12 to extract features from the signal x(j).This is illustrated in FIG. 8. The wavelet transform generates waveletcoefficients which are combined by a fuzzy inference mechanism 15. Asdiscussed earlier, a wavelet is represented as Ψ_(a),b, where Ψ is themother wavelet, a is the scaling factor and b is the translation in timeor space depending upon the context. n.di-elect cons.N number of waveletscales are chosen which produce best results for the anticipateddefects. The set of wavelets for some b is given by D={Ψ_(a1),b,Ψ_(a2),b, Ψ_(a3),b, . . . , Ψ_(an),b }. The choice of the wavelet scalesa_(i), i=1, . . . , n, is obtained by an optimization process that worksoff-line. The wavelet coefficients for each wavelet Ψ_(a),b and theinput signal x(j) are calculated as ##EQU22## where N is the number ofsamples for which Ψ_(a),b is non-zero. Since most of the faults producea signature in a wide range of frequencies that is spread over a rangeof time (or space), m>0 number of coefficients c_(a).sbsb.i arebuffered. A transformation χ is applied to the wavelet coefficients toget a trend of the fault signature.

    c.sub.ji =χ(c'.sub.a.sbsb.i.sub.,b.sbsb.j)i=1, . . . ,n, j=1, . . . ,m

The transformation χ varies from one application to another. It can be,for example, envelope extraction, magnitude of a complex value, etc. Thetransformation χ involves scaling so that max{c_(ji) }≦1. Thecoefficients c_(ij) are stacked in a matrix arrangement which isreferred to as Information Matrix W, since it stores the informationabout all the faults.

The matrix W with elements c_(ji) has the following characteristics: (1)for a fixed j=u, the c_(ui) 's give the frequency response of the inputsignal at a particular instant; (2) for a fixed i=v, the c_(jv) 's givethe relative level of a particular frequency over a period of time (orspace); and (3) each column of the matrix W is referred to as w_(i), i=1. . . n, and is comparable to a bandpassed version of the signal.

The matrix W is represented as follows ##EQU23##

The columns, ω_(i), represent the features obtained from the inputsignal. w_(i) .di-elect cons.U.OR right.R^(m) is the input space to theFDI algorithm of the present invention and are vague representations ofthe fault modes.

c. Knowledge-Base

The knowledge base of the expert system of the present invention storesthe information which is helpful in decision making. It attempts toorganize all the information available about the system and its faultsthrough mathematical models, experience, heuristics, human expertise orany other source. The knowledge-base of the FWA contains therepresentative features for the different wavelet scales, for each oneof the anticipated faults. The knowledge-base is represented by κ.ORright.B=U×V fuzz space, where U=U₁ x . . . xU_(n) is the input space andV is the output space.

The generation of the knowledge-base is done off-line. Optimizedversions of ω_(i) are saved as β_(ai),k which represent the trends forscale α_(i) (frequency) for the kth fault (k=1 . . . M), where M is thetotal number of anticipated faults. The optimization process chooses thebest set of wavelet scales (α_(i)) and stores the template features forthese scales. The process of generation of κ is outlined below.

1. Experimental Analysis of Known Faults: Signal data representingfaults from the system under observation are collected and stored.

2. Initial Guess of Wavelet Functions: A finite number, n, of waveletfunctions are initially chosen with arbitrary wavelet scales. The choiceof n is initially based on heuristics, but if the FWA system fails toperform adequately after optimization, its value can be increased.

3. Formation of the Information Matrix: The wavelet coefficients arecalculated using the selected wavelet function and are stored in theinformation matrix. The ω_(i) components of the information matrix nowrepresent the reference features and are called β_(ai),k (referencefeature with scale a_(i) for the kth fault).

4. Optimizing the Wavelet Scales: The components, β_(ai),k, of theinformation matrix are optimized by changing the wavelet scales, α_(i),to maximize the detectability and identifiability measures.

5. Formation of the Rule-Base: The optimized β_(ai),k are then fuzzifiedinto corresponding fuzzy sets F^(l) _(i) (the fuzzification process isexplained in detail below for the lth defect rule. Output sets Gl areconstructed as fuzzy singletons as follows:

    {0/1+0/2+ . . . 0/(l-1)+1/l+0/(l+1)+ . . . 0/L}

The lth component, R^(l) of the fuzzy relation is constructed asfollows:

    R.sup.l =F.sub.1.sup.1 * F.sub.2.sup.l * . . . * F.sub.n.sup.l * G.sup.l, l=1, . . . , L

where * is one of the T-norms given in Equation 23. R^(l) .di-electcons.U X V, l=1, . . . , L, constitute the knowledge-base k. L is thetotal number of IF-THEN rules. ##EQU24##

d. Fuzzification

The fuzzification unit of the FWA calculates the degree of membership ofthe features ω^(i) with the templates of the knowledge-base. Themethodology presented here for formation of fuzzy sets for the elementsof rule base κ is different from the conventional approach. Previousapproaches are more inclined towards analysis of stream of data orsimilarity of possibility distributions. The approach presented herefits in the framework of fuzzy analysis to a greater extent and isespecially useful in fuzzy interpretation of wavelet transforms. The FWAof the present invention preferrably uses a similarity measure given inEquation 24 for the fuzzification of the input features. However, itwill be apparent to those skilled in the art that the conventionalapproach for formation of the fuzzy sets can be used as well. ##EQU25##

The membership function μ_(A) (x) is defined using the similarityfunction defined in Equation 24 as follows:

    μ.sub.A (x)=sim(C,x)                                    Equation 25

where C.di-elect cons.X is a crisp vector whose value is decided apriori.

Based on the definition in Equation 26, the input to the inferenceengine, A=(A₁, . . . , A_(n)).di-elect cons.U, is the grade ofmembership of the vector ω_(i) in β_(ai),k,, which is given as:

    μ.sub.A.sbsb.1 (ω.sub.i)=sim(β.sub.a.sbsb.i.sub.k,ω.sub.i), k=1 . . . MEquation 26

The fuzzy set A_(i) as M elements which correspond to degree ofbelonging of w_(i) in each of the fault modes.

Likewise, the fuzzy sets F¹ _(i) are obtained as the degree ofmemberships of defects signatures in the rule-bases with each other. Foran lth defect, the fuzzy set F¹ _(i) is given as follows:

    μ.sub.F.spsb.1.sbsb.1 (β.sub.a.sbsb.i.sub.,k,β.sub.a.sbsb.i.sub.,l), k=1 . . . MEquation 27

e. Fuzzy Inferencing

Inferencing or decision making is done by a set of IF-THEN rules. Letthe input universe of discourse be U=U₁ x . . . xU_(n) and the outputuniverse of discourse be V. The input (fault features) variables arew_(i) .di-elect cons.U_(i), w=(w₁, . . . , w_(n)).di-elect cons.U, andoutput variable is y.di-elect cons.V. ω_(i) are the columns of theinformation matrix and output (decision) variable is y.di-elect cons.V:F^(l) _(i) and G^(l) are fuzzy sets in U_(i) and V, respectively. Therules-set is given as follows: ##EQU26##

Typically, one rule is sufficient for the identification of each type ofdefect. Hence, the number of rules is equal to the number of defects,that is, L=M.

The output fuzzy set B in V is calculated as B=κ∘A, where ∘ is the fuzzycomposition given by Equation 29 as follows:

    μ.sub.B.spsb.1 (y)=sup.sub.x.sbsb.i.sub..di-elect cons.U  μ.sub.F.spsb.1.sbsb.1.sub.x...xF.spsb.1.sbsb.n.sub.→G.spsb.1 (x,y)*μ.sub.A (x)!                                     Equation 29

Since κ is composed of a number of relational rules, each rule generatesan output

B¹ =R^(l) ∘A. The first step in achieving this is to calculate thepremise part, that is,

    A: A.sub.1 and A.sub.2 and . . . and A.sub.n

This is done mathematically as follows:

    A=A.sub.1 *A.sub.2 * . . . *A.sub.n                        Equation 30

where * is one of the T-norms given in Equation 23. The next step is tocompare A with the rulebase and generate the output fuzzy set B^(l),

    μ.sub.B.spsb.l (y)=sup.sub.weu  μ.sub.R.spsb.l (ω,γ)*μ.sub.A (ω)!

The final output is obtained by applying one of the S-norms given inEquation 31 in Equation 32 as follows: ##EQU27## The fault mode isidentified by defuzzifying the final output fuzzy set B:

    y=arg sup.sub.y .di-elect cons.v(μ.sub.B.sup.l (γ))Equation 33

The output of Equation 33 gives the decision that the yth defect hasoccurred.

f. Performance Metrics

Once a decision about the defect has been reached, the FWA assigns aDegree of Certainty (DOC) to the fault decision. DOC is a measure ofconfidence in the decision. It is used to take-into account theuncertainty inherent in the system. Under perfect recall conditions theoutput of the inference engine, B^(l), would be identical to the outputassociation, G^(l), in the training set. However, under normal operatingconditions B^(l) and G^(l) do not match perfectly due to a large grainuncertainty in the input. DOC gives an indication of the closeness ofthe actual decision to the original training output.

    DOC.sub.1 =h(G.sup.l B.sup.l), l=1, 2, . . . ,L            Equation 34

where, h: 0,1!→ 0,1! ##EQU28##

Since, in this case G^(l) is defined as a singleton,

    DOC.sub.1 =μ.sub.B.spsb.l (γ.sup.l)               Equation 36

A value of DOC₁,=1 indicates a perfect recall for the lth rule, while onthe other hand a value of DOC_(l) close to 0 implies that the belief ofthe occurrence of that particular feature is very small. The values ofDOC indicate the robustness of the decision making logic of theinference mechanism.

g. Detectability and Identifiability Measures

Identifiability and detectability are measures of robustness of the FDIscheme which aims at minimizing the sensitivity of detection performanceof modeling errors, uncertainties and system noise. Detectability is theextent to which the FDI scheme can detect the presence of faults. Itrelates to the smallest fault signature that can be detected and thepercentage of false alarms. Identifiability of the FDI system goes onestep further in distinguishing between various fault modes once thepresence of a fault has been established. Identifiability targetsquestions like the source, location, type and consequence of failure andthe distinguishability between sensor, actuator or system failures.

In intelligent schemes, detectability and identifiability depend upon anumber of factors that may vary from one system to another. For the EWAanalysis introduced here, the detectability D_(k) (a_(i)) of the kthfault from a stream of signal data x(t) is given by

    D.sub.k (α.sub.i)=1-e.sup.-d.sbsp.k.sup.(α.sbsp.i.sup.) i=1, . . . n                                                     Equation 37

where ##EQU29## and F_(k) (α_(i))=magnitude of the feature in w_(i) forthe scale a_(i) for the kth fault,

N(α_(i))=mean square value of the random noise in w_(i) for the scalea_(i),

L.sub.Ψ.sbsb.α =length of the wavelet function for the scale a_(i),

S=factor for decimation, e.g., scale factor in fractal scanning,

L_(k) =length of feature for the kth fault,

λ=constant less than 1

The logic behind using the maximum value for the detectability is thateven if a single wavelet frequency is triggered, it is sufficient fordetecting the presence of the fault. This however is not the case inidentifiability where more information is also required.

The greater the value of D_(k), the greater the detectability of the kthfault. The identifiability, I_(k), of a particular fault k depends onhow clearly it relates to the rule-base and how different it is fromother faults. If w_(i),k is the feature for the kth fault using a_(i) thscale, a measure of I_(k) is given below ##EQU30##

It can be observed that detectability and identifiability measuresentail different levels of intelligence of the knowledge hierarchy.Detectability belongs in the information level as it contains a notionof signal to noise ratio (data) along with the window parameters(limited time horizon). On the other hand, identifiability can beclassified into the Knowledge level as it uses the whole knowledge-basein a vast horizon.

4. Learning

An important attribute of intelligent systems is their ability torestructure or update the knowledge-base, based on information from pastexperience. This is termed as learning. The FWA of the present inventionpreferably uses both on-line and off-line learning to increase theknowledge of the system and to thereby improve the detection andidentification processes.

a. On-Line Learning

There are a number of factors that produce unanticipated noisevariations in the input signal. As an example, noise variations areoften encountered in the digital images of CCD cameras. These noisevariations are low frequency variations resulting mainly from thefollowing factors: (1) variation in lighting and illumination; (2)imperfections of the CCD sensor element; and (3) spherical aberration ofthe lens.

The goal of on-line learning or adaptability is to nullify the effectsof the above-mentioned factors by adjusting the FWA parameters in theopposite direction. This is utilized at two stages: (1) duringpreprocessing of the input signal; and (2) at the time of fuzzification.

At the preprocessing stage, the system of the present invention isdesigned to obtain information from the statistical evidence containedin the input signal x(n) through a finite memory model. The mean of thesignal x_(DC) is calculated by moving average estimator: ##EQU31## Thevariance of the signal σ_(x) is calculated by: ##EQU32## The inputsignal is scaled by a factor K(n):

    x(n)=K(n)x'(n)                                             Equation 42

The value of K is updated as:

    K(n)=K(n-1)+L.sub.1 (σ.sub.normal -σ.sub.x (n))Equation 43

Where σ_(normal) is the required variance in the signal, and L₁ is thelearning coefficient (typically 0.01). The learning coefficient attemptsto minimize deviations in the variance of the input signal.

At the fuzzification stage, the system of the present invention uses thesimilarity function to maintain a predetermined level of fuzziness(entropy) of the inference engine. The value of α in the similarityrelation is adjusted so that the fuzzy membership value of the setsω_(i) given by μ_(A).sbsb.i (ω_(i)) is close to μ_(N), a constantdefined a priori (typically 0.2). The value of α for the sample n andthe scale α_(i) is updated by:

    α.sub.i (n)=α.sub.i (n-1)+L.sub.2 (μ.sub.N -μ.sub.A.sbsb.i (ω.sub.i))                       Equation 44

L₂ is the learning coefficient (typically 0.01).

b. Off-Line Learning

The off-line learning process of the present invention provides the FWAwith the ability to generate its knowledge-base from sample defects.This is an optimization process which selects the optimum wavelet scalesfor the given set of defects and stores the corresponding features inthe rulebase.

As discussed above, the wavelet coefficients act as frequencydiscriminators on a localized time basis. Different fault featuresrespond differently to various frequencies. Hence it is important tochoose a set of wavelet functions that span the frequency range of allthe anticipated defects. It is also required that the wavelets in thisset are tuned to different fault features. This implies that the waveletcoefficients generated by one defect would be quite distinct fromcoefficients of other defects, hence increasing the identifiability ofthe system.

The process of tuning the wavelet scales is accomplished off-linethrough an optimization process. The goal is to maximize the minimumdetectability D_(k), k=1, . . . , M, and the combined identifiabilityI_(k), while keeping the detectability and identifiability of the otherdefects above a predetermined threshold. This can be written as##EQU33## subject to

    D.sub.k >T.sub.Dk =1, . . . M.

    I.sub.k >T.sub.Ik= 1, . . . M.

T_(D) and T_(I) are the minimum acceptable levels of detectability andidentifiability, respectively, for any defect. The scales a_(i) arevaried within predetermined ranges, so that the value of J is maximized.

Since there is no input signal (only reference signals are used) in thiscase and only the members of the rule-base are to be compared, D_(k)(α_(i)) and I_(k) (α_(i)), as given in Equation 37 and 39, become:

    D.sub.k (α.sub.i)=1-e.sup.-d.sbsp.k.sup.(α.sbsp.i.sup.) i=1, . . . ,n                                                    Equation 46

and ##EQU34## where F_(k) (α_(i))=magnitude of the feature in theβ_(ai),k for the scale α_(i) for the kth fault,

N(α_(i))=mean square value of random noise β_(a),k for the scale α_(i),

L.sub.Ψa.sbsb.i =length of the wavelet function for the scale a_(i),

s=factor for decimation, e.g., scale factor in fractal scanning,

L_(k) =length of feature for the kth fault,

λ=constant less than 1 ##EQU35## Since sim(β_(a).sbsb.i i,β_(a).sbsb.i_(k))=1 ##EQU36##

Identifiability requires that the similarity of the input features be asclose as possible to the template of the corresponding defect in theknowledge-base, yet very different from the templates of all otherdefects. This means that the similarity measure between the inputfeature and its corresponding template be close to 1 and near 0 for theothers. If this is not the case, then the similarity measures will be inthe interval (0,1), and the certainty of association to one category anddisassociation to other categories decrease. This is similar to thenotion of entropy. Entropy, being a measure of fuzziness, is high whenthe values of the fuzzy set are around 0.5. If the values are close to 1or 0, the set is more crisp and its entropy is low. Hence, if theidentifiability of the system is high, the entropy of the knowledge-baseis low and has less uncertainty. Therefore, an intuitive link betweenidentifiability and system entropy is established.

Apart from the intuitive link, a mathematical link between fuzzy entropyand identifiability can also be established. Consider the most generalform of entropy as given in Equation 51. Since there are finite numberof elements in the knowledge-base, the integral sign in Equation 51changes to summation. The entropy of the kth rule of the knowledge-baseB, is given as follows: ##EQU37##

where f is any function f: 0,1!→ 0,1!, such that f is monotonicallyincreasing in the 0,1/2! interval and monotonically decreasing in the1/2,1! interval, as given in Equation 52.

According to Equation 26,μ_(A).sbsb.i.sub.,p (ω_(i),k)=sim(β_(a).sbsb.i,p,A_(i),k), p=1, . . . , M. Hence, ##EQU38## Let f be atriangular function given by: ##EQU39## For most practical cases##EQU40## Hence, we can replace (f(sim(β_(a).sbsb.i.sub.,k, ω_(i),k)) by1-sim(β_(a).sbsb.i.sub.,k, ω_(i),k) and f (sim(.sub.α.sbsb.i.sub.,p,ω_(i),k)) by sim (β_(a).sbsb.i.sub.,p,ω_(i),k) ##EQU41## Using Equation39:

    H.sub.k (B)=1-I.sub.k                                      Equation 59

Since I_(k) .di-elect cons. 0,1!, it can be seen from Equation 59 thatmaximizing identifiability means minimizing the entropy of the systemand vice versa. In other words, H=I, that is, entropy is the complementof the identifiability, as predicted intuitively.

c. Off-Line Learning Using a Genetic Algorithm

In accordance with the preferred embodiment of the present invention theoptimization problem given in Equation 46 is solved by using a knownGenetic Algorithm (GA). Alternatively, other methods, such ascalculus-based methods, can be used to solve the optimization problem.GAs are search algorithms based on the mechanics of natural selectionand genetics. They combine survival of the fittest among stringstructures with a structured, yet randomized, information to form asearch algorithm.

Genetic Algorithms were developed by John Holland and his colleagues atthe University of Michigan. The goals of their research have beentwo-fold:

1. To abstract and rigorously explain the adaptive processes of naturalsystems; and

2. To design artificial software that retains the important mechanism ofnatural systems.

In comparing GAs with calculus-based methods, it is apparent that thereare distinct advantages and disadvantages to both. Calculus-basedmethods of optimization have been studied extensively. These aresubdivided into two main classes: indirect and direct methods. Indirectmethods seek local extrema by solving the usually nonlinear set ofequations resulting from setting the gradient of the objective functionequal to zero. This is a multidimensional generalization of theelementary callous notion of extreme points, as illustrated in FIG. 9a.Given a smooth, unconstrained function, finding a possible peak startsby restricting the search to those points with slopes of zero in alldirections. On the other hand, direct (search) methods seek local optimaby hopping along the function in the direction of the gradient. This issimply a notion of hill climbing: to find the local best, climb thefunction in the steepest permissible direction. Both of these methodsare local in scope; the optima they seek are best in a neighborhood ofthe current point. In case of a function as in FIG. 9b, starting thesearch in the neighborhood of the lower peak will result in missing themain event (the higher peak). Once the lower peak is reached, furtherimprovement is not possible. Another problem with calculus-based methodsis that they are based on the existence of derivatives. In manyapplications the derivative of the function might not exist. As shown inFIG. 10, signals in real life are noisy and unsuitable for thesetraditional methods.

Due to the shortcomings of calculus-based techniques, random searchalgorithms have achieved increasing popularity. GAs are global in natureand the possibility of converging to a local minima is very small. Theyprovide a robust random yet systematic search technique that is suitablefor optimizing the rule-base of the FWA. The drawback of GAs is thatthey are computationally intensive and although their convergence ishighly probable, is not guaranteed.

The GA attempts to emulate the phenomena of natural selection andreproduction based on the principle of the survival of the fittest. Someof the terms used in GAs are explained below:

Population: A set of members (variables) that are present at one time inthe process of evolution.

Chromosome: A string (set of bits) that characterizes a member ofpopulation distinct from another.

Evolution: The development in the chromosomes of the population over aperiod of time.

Generation: A population at a particular stage of evolution.

Mating (Reproduction): The combination of chromosomes of one generationto produce offsprings of the next generation which have genetic (relatedto the chromosomes) traits of the parents.

Crossover: The swapping of a part (or parts) of the chromosomes of themating members while producing chromosomes of the next generation.

Mutation: Inversion of one or more bits of the chromosomes of the matingmembers while producing chromosomes of the next generation.

Crossover Rate: The probability by which the crossover occurs.

Mutation Rate: The probability by which the mutation occurs.

Elitism: Since the best chromosomes might be destroyed due to mutationand crossover, one way of avoiding this is to use elitism, in which thebest chromosomes in the parent population are copied into the nextgeneration.

Steady State Reproduction: This is a further extension of elitism. Inthis method only a subset of the whole population is allowed toreproduce. The offsprings replace equal numbers of members that have thelowest fitness level.

Working of Genetic Algorithm:

The usual flow of a typical GA is as follows:

1. Initialize a population of chromosomes, call this number P;

2. Evaluate each chromosome in the population;

3. Create new chromosomes by mating current chromosomes; apply mutationand crossover as the parent chromosomes mate;

4. Delete members of the population to make room for new chromosomes;

5. Evaluate the new chromosomes and insert them in the population; and

6. If time is up, stop and return the best chromosomes if not, go to 3.

Mathematical Implementation of Genetic Algorithm

The free variable of the genetic algorithm is translated into a stringof bits through a bijective mapping. The most convenient mapping is thebinary representation of the free variable. For example, if the functionf(x)=x² is to be maximized in the interval 0,3.1!, one mapping X for afive bit string would be as follows: ##EQU42## where subscript 2represents the binary base 2. Hence, for example, x=0.5 is representedas (00101)₂ and x=1.5 is represented as (01111)₂.

The fitness level of a member of the population is calculated by thevalue of the objective function given from the particular string ofchromosomes for that member. The closer the value of the objectivefunction to the required value, the more fit are the chromosomes of thatmember. For example, in the above mentioned case, if the objectivefunction is ##EQU43## then (01111)₂ is more fit than (00101)₂. This isbecause (00101)₂ represents x=0.5 and (01111)₂ represents x=1.5 and thevalue of the objective function is greater for x=1.5 than for x=0.5.

The process of selection of parents for reproduction is based on theunderlying idea that the fittest parents should be able to mate yet theprocess is randomized to allow globalization of the search process. Theparents are selected at random but the probability of choosing the bestparents is more than that of the others. This is done by making theprobability of selection of any member of the population forreproduction equal to its relative fitness level. One way of achievingthis is by the so called Roulette Wheel Parent Selection, explainedbelow:

1. Sum the fitness of all the population members; call the result thetotal fitness;

2. Generate r, a random number between 0 and the total fitness; and

3. Return the first population member whose fitness, added to thefitness of the preceding population members, is greater than or equal top.

An example of roulette wheel parent selection is shown in FIG. 11. Tenchromosomes with their individual fitness and running total are shown.The second table shows the chromosomes that would be selected based onthe random numbers.

The process of reproduction involves the combination of chromosome bitstrings of the parents into chromosomes of children by bit crossover andmutation.

Bit Mutation: When bit mutation is applied, the bits in the chromosomestring are inverted with a probability factor called mutation rate. Thisvalue is usually very low (typically 0.008).

One-Point Crossover: For one-point crossover, a cross-over point israndomly selected. All the bits after the crossover point, in theparents' strings, are swapped to obtain the chromosomes of the children.The crossover rate is usually high (around 0.65).

Two-point crossover: Two-point crossover is similar to one-pointcrossover, except that two crossover points are randomly selected andall the bits between them are swapped. Examples of two-point crossoverare shown in FIG. 12.

Implementation of GA for FWA

In accordance with a preferred embodiment of the present invention, theoptimization program uses GA for off-line learning and has beenimplemented using MATLAB™ produced by Mathworks, Inc. of Natlick, Mass.The default value for the number of wavelet functions n is 5. However,this value can be increased if the optimization process fails toconverge for the given thresholds T_(D) and T_(I). The initialpopulation of P=100 members is chosen randomly. Each member isrepresented by a pair <S,F>, where S=(α₁,α₂, . . . α_(n)) is the set ofthe wavelet scale and F is the fitness level of the set (value of theobjective function). For the sake of clarity S and F are represented as:

    S:S.sup.j j=1, . . . ,P                                    Equation 61

    F:F(S.sup.j)                                               Equation 62

a^(j) _(i) represents the scale a_(i) th member of the jth set.

F is calculated as follows:

    F(S.sub.j)=D(a.sup.j.sub.i)=I(a.sup.j.sub.i)               Equation 63

where ##EQU44## where D^(j) _(k) (α_(i)) and I^(j) _(k) (α_(i)) are thedetectability and identifiability measures as given in Equations 46 and50, for the jth member of the population.

The GA used for the optimization process of the FWA uses two-pointcrossover with a crossover rate of 0.65 and mutation rate of 0.008.

The representative signals for the known defects are collected andstored. n_(p) number of initial population of P members are selected atrandom. For a given fault k, intermediate values of detectability d^(j)_(k),α.sbsb.i are calculated for a particular j as follows: ##EQU45##

The detectability is obtained by taking the maximum value over differentscales. This is equivalent to taking a maximum offer a row in the tableshown in FIG. 13. ##EQU46## Likewise, for given k similarity measures^(j) _(k),a.sbsb.i of the scale, α_(i), are calculated by: ##EQU47##I^(j) _(k) is calculated for each row in FIG. 13. ##EQU48## Finally,I^(j) _(k) and D^(j) _(k) are added to get the fitness level for eachmember.

As shown in FIG. 13, P number of fitness levels are obtained which areassociated with each set of wavelet scales. The wavelet sets areassigned as probability for reproduction according to the roulette wheelmethod described above. Mutation and crossover are applied to thecorresponding elements of the wavelet sets. Members of the old set aredeleted and replaced by the new generation. Preferably, the process isrepeated until the optimization converges or for 100,000 cycles,whichever is achieved first.

5. Preferred Embodiment

The FDI system of the present invention will now be discussed inaccordance with the preferred embodiment wherein it is incorporated intoa textile fabric manufacturing process. The textile industry is drivenby the need for quality control and monitoring in all phases ofproduction. One very important step in quality assurance is thedetection and identification of defects occurring in woven fabrics.Unfortunately, there is currently no satisfactory on-line faultdetection system available and inspections usually are done manually,which is both ineffective and expensive. The FWA of the presentinvention has been successfully applied to defect detection andidentification of textile fabrics. The system of the present inventionpreferably is implemented directly on the loom so that time delaybetween production and control is minimized.

In order to classify and prioritize textile defects, a survey wasconducted by collecting data from five major textile fabric producers inGeorgia and South Carolina. The defects were rated based on the mostcommon and the most costly defects. The results of this survey are shownin FIG. 14.

A description of these defects is given below:

Abrasion: sections of fabric that appear abraded.

Blown Pick: broken pick for an air jet loom.

Bow: where filling yarns lie in an arc across the width of the fabric.

Broken End: where a warp yarn has often ruptured and been repaired;often produced by some mechanical means like chafing; oftencharacterized by the broken end being woven into the fabric.

Broken Pick: where a filling break leaves a pick missing for a portionof the width of the fabric; often caused by weak yarn; often seriousenough to cause degrading of woven fabrics.

Coarse End: an end whose diameter is noticeably greater than what isnormal to the fabric.

Coarse Pick: a pick of filling whose diameter is noticeably larger thanwhat is normal to the fabric.

Coarse Yarn: a yarn whose diameter is noticeably larger than what isnormal to the fabric (may be warp or filling yarn).

Cockled Yarn: a yarn in which some fibers appear wild or tightly curledand disoriented. This is the result of some fibers being too long forthe draft roll settings so that the succeeding roll grips the fiberbefore the preceding roll releases it, causing the fiber to snap andcurl. Often appears as tiny slubs in the fabric.

Double End: two ends where only one is called for by the design of thefabric.

Double Pick: two picks in a single shed where only one is called for inthe design of the fabric.

Doubling: a filling yarn twice the normal size due to two ends of aroving running together into a single end of spinning. The sameoccurrence in warp yarn would result in a course end. Two warps weave asone due to faulty drawing in when warp was drawn through harness priorto weaving or due to improper harness action.

End Out: a missing warp yarn; can be due to lack of strength or tobreaking.

Filling Band: a visually perceptible band across the width of the fabricdirectly attributed to a difference in the chemical or physicalcharacteristic of the filling.

Filling Waste: small bunches of waste of whatever was added to thefilling yarns to help provide proper tension to yarns.

Flat(Reed Misdraw/Wrong Draw: a misdraw in a plain weave resulting intwo ends weaving as one and opposing two other ends weaving as one.

Float: a thread extending unbound over or under threads of the oppositeyarn system with which it should have been interlaced.

Fuzz Balls/Lint Balls: balls of fiber encircling the warp yarn formed bythe abrasion of the loom. These usually result from the lack ofsufficient sizing material on the warp yarns, causing what is generallyreferred to as soft warp.

Gout: an accumulation of short fiber or fly spun into the yarn or drawninto the loom shed. This defect differs from slubs in that slubsgenerally are symmetrical in shape while gout appears as undraftedlumps.

Hang Thread: a thread left hanging on the face of the fabric. The mostcommon cause is the failure of a weaver to clip the excess yarn afterrepairing a broken end and the cloth inspector's failure to removeexcess yarn.

Hard Size: a place in a fabric characterized by a harsh, stiff hand anda cloudy, uneven appearance. This is most common in mill finished yarndyes and is the result of a slasher stop that allows excessive amountsof sizing material to harden onto the yarn. This generally appears inbands across the width of the fabric. Also caused by differences intension or slight variations of original yarns.

Harness Balk/Harness Skip: an isolated failure of a loom harness to movein its prescribed sequence, causing a filling to float over certain warpends with which it should have interlaced.

Harness Drop/Harness Breakdown: a place where a harness ceases tofunction resulting in the ends drawn through that harness floating onthe face or on the back of the fabric. Also can give a dotted lineappearance from the inner edges of the selvage.

Harness Misdraw: where one or more ends are drawn through the harnesscontrary to the design of the weave.

Kinky Filling: a place in the fabric where a pick of filling has beengiven enough slack to twist on itself for a short distance caused by amalfunctioning filling fork, excessive twist in the yarn, inadequatesetting of filling twist.

Knot: a place where two ends of yarn have been tied together.

Loom Waste: a place in the fabric where accumulated waste off the loomhas found its way into the fabric perhaps by air current.

Loop in Shed: loopy filing, a filling hanging for an instant of time ona warp knot or other protrusion until freed by the stroke of the reed.This results in a short loop of filling appearing on the face of thefabric or kinky filling, a place in a fabric where a filling has beengiven enough slack to twist on itself for a short distance. Probablecauses are a malfunctioning of filling fork, too much power in thepicking motion, excessive twist in yarn, inadequate setting of fillingtwist.

Loopy Filling/Hang Pick: a pick of filling hanging for a split second ona warp knot or other protrusion until freed by the stroke of the reed.This results in a short loop of filling appearing on the face of thefabric.

Mat-up: a place where the warp yarns have become entangled so as todisrupt the proper interlacing of warp and filling caused by loomfailing to stop when an end breaks or the introduction of a piece ofwild yarns; can be severe.

Mismatch/Mispick: where the weave design is broken by the absence of apick or a filling.

Mixed Yarn: yarn that is alien to a fabric because of its peculiarchemical or physical characteristics, can be caused by variation inblend or twist.

Neppiness: an excessive amount of tangled mass of fiber appearing on theface of the fabric.

Oily End: a warp yarn that has been soiled by grease or dirt.

Oily Filling: filling yarn that has been soiled by grease and dirt.

Oily Spots: a discolored place or stain on a fabric, resulting from anynumber of sources.

Reed Mark: a defect resulting from a bent reed wire, characterized by afine line thin place in the warp direction.

Reedy: a condition characterized by open streaks following the patternof the reed wires. This can be the result of too coarse reed, wrong reeddraw arrangement or improper setting of the loom.

Short Pick: this is the result of the filling insertion mechanism on ashuttleless loom not holding and releasing the filling yam too soon.This allows the yarn to snap into the body, leaving a missing pickpart-way across the width of the fabric. The released pick is then woveninto the fabric in a somewhat tangled mass.

Skew: where the filling yarns are off square to the warp ends.

Slack End: the result of a loose or broken end puckering as it isgradually woven into the fabric.

Slack Warp: fabric woven with less than the required tension. Extremesresult in an overall crimped or cockled appearance and a stretchyunstable fabric.

Slasher Oil: Like oily spot, but caused by slasher oil.

Sloughed Filling: a defect caused by extra winds of filling slippingfrom the bobbin and being woven into the fabric. This is usually theresult of soft bobbins wound with insufficient tension or too much poweron the picker stick of the loom.

Slubby Filling: a bobbin of filling containing numerous slubs (a termused to describe a short thick place in a yarn).

Slub: a term used to describe a short thick place in a yarn that isusually symmetric.

Start Mark: a mark resulting from the warp yarn elongating under tensionwhile a loom is stopped; when the loom is restarted, the slackness istaken up by the weave, leaving a distortion across the width of thefabric.

Stop Mark: a defect resulting from the warp yarn elongating undertension while a loom is stopped; when it is started again, the slacknessis taken up by the weave, leaving the distortion across the width of thefabric.

Temple Bruise: a streak along the edge of the fabric that has beenscuffed and distorted by a damaged malfunctioning or poorly set temple.

Thick Place: a place across the width containing more picks or heavierfilling than that normal to the fabric.

Thin Place: a place across the width containing less picks or lighterfilling than that normal to the fabric.

Tight End: an end running taut due to some abnormal restriction. Ittends to force the filling to the surface of the fabric and ischaracterized by a fine line streak of filling showing through like areed mark.

Uneven Fabric Width: inconsistent fabric width.

Uneven Filling: a filling whose variation of diameter is noticeableenough to detract from the appearance of a fabric caused by choke on adrafting roll, poor distribution of fiber length, less than optimumdraft distribution, incorrect roll settings, eccentric behavior ofdrafting rolls.

Wavy Cloth: cloth woven under conditions of varying tensions, preventingthe even placement of filling picks resulting in a fabric with randomlyalternating thick and thin places which is generally traceable to afaulty take up motion or let off motion in the loom.

FIG. 15 illustrates a preferred embodiment wherein the FDI system of thepresent invention is incorporated into an actual loom for detecting andidentifying defects of the type defined above in textile fabrics beingmanufactured. It will be apparent to those skilled in the art that theFDI system of the present invention can be disposed at virtually anylocation along the loom provided that the location is suitable forcapturing an image of the textile fabric being manufactured. Inaccordance with the preferred embodiment, one CCD array camera 23 isfixedly mounted to a frame 21 every 12 to 15 inches of fabric width. Theframe 21 is connected to the loom such that the cameras 23 are disposedto capture images of the fabric 20 being manufactured by the loom. Alight source 28 is preferably, but not necessarily, positioned so thatthe fabric being manufactured is interposed between the light source 28and the cameras 23. The fabric is moved along the loom by fabric motionmotor 27 which receives control signals from fabric motion drive control26. A computer 29 is coupled to the cameras 23 and to the loom controlsystem (not shown) for obtaining images captured by the cameras 23 andfor performing the fractal scanning technique and the fuzzy waveletanalysis of the present invention to detect and identify defects in thefabric 20. The computer 29 controls the manufacturing process inaccordance with the types of defects identified to eliminate or minimizedefects. The computer 29 preferably contains a Pentium™ processor, butmay also contain other types of microprocessors as well as parallelprocessors. The computer 29 preferably is equipped with a frame grabbercard for receiving and storing digital representations of the imagescaptured by each of the cameras 23 in memory inside computer 29. Thecomputer 29 multiplexes among the outputs of cameras 23 so that each ofthe images captured by each of the cameras 23 is separately analyzed.Each camera 23 looks at one particular area of the fabric 20 so that thecombination of the images captured by the cameras 23 make up a fullimage of the fabric 20. If defects are detected over corresponding scanlines in at least two cameras, the FDI system of the present inventiondetermines that a defect has occurred and proceeds to identify the typeof defect.

In accordance with the preferred embodiment, the CCD array cameras 23are operating in the visible spectrum. The light source 28 preferablycomprises four standard fluorescent light bulbs. A diffuser (not shown)disposed between the light source 28 and the fabric 20 providesuniformity in the light being projected on the fabric 20. A televisionmonitor (not shown) can also be coupled to the cameras 23 so that anoperator can view the images being captured by the cameras 23. Theintensity of the light source 28 can be adjusted by the operator tooptimize the images being captured by the cameras 23. A diffuser ischosen based on the type of fabric being inspected to obtain optimumillumination. Also, the portion of the loom proximate the FDI system ofthe present invention is preferably within an enclosure so that thelighting of the FDI system is closely controlled and noise from otherlight sources is eliminated or minimized.

In accordance with the preferred embodiment, the CCD array cameraspreferably are Polaris Industries Model VT 90D industrial quality highresolution black and white CCD cameras. The Model VT 90D has aresolution of 811 (H)×508 (V) pixels and an image area of 7.95 mm×6.45mm. The horizontal frequency is 15.734 kHz and the vertical frequency is60 kHz. The television monitor preferably is a Toshiba monochrome blackand white Model TVM 1001 with a 10 inch screen. The frame grabberpreferably is a Microdisc, Inc. monochrome frame grabber, ModelOC-TCXO-MXD10.

FIG. 16 is an alternative embodiment of the present invention whereinthe image sensor 23 is a line scan camera preferably comprising 7,000pixels arranged in one line, preferably transverse to the movement ofthe fabric 20. Therefore, only one line of pixels is being used to scanthe image. In order to construct a 2-D image with the line scan camera,several lines must be accumulated. However, by accumulating the linescans to build the full image, a higher resolution image is obtained dueto the higher resolution of the line scan camera as compared to the CCDarray cameras. Once the full image has been obtained, the image isprocessed to detect and identify defects in the fabric. The processingof the image obtained in accordance with the embodiment of FIG. 16 isessentially the same as the processing of the image obtained inaccordance with the embodiment of FIG. 15, with the exception that theframe grabber is unnecessary in the embodiment of FIG. 16.

FIG. 17 illustrates another embodiment of the present invention whereinthe sensor array 23 is a CCD array camera movably secured to a lineardrive 25 via a linear drive stepper motor 24. A stepper motor controller(not shown) is connected to computer 29 and to stepper motor 24 forreceiving control signals from computer 29 and for delivering pulses tostepper motor 24 for moving CCD array camera 23 in the longitudinaldirection along linear drive 25. A linear slide end-of-travel switch(not shown) is located at each end of linear drive 25 for communicatingwith computer 29 to enable computer 29 to determine the location of CCDarray camera 23 along the linear drive 25. A fabric travel encoder (notshown) comprised in the fabric motion drive control 26 communicates withcomputer 29 to enable the computer 29 to determine the coordinates ofthe area of the fabric 20 being captured by CCD array camera 23. In allother respects, the embodiment of FIG. 17 is identical to theembodiments of FIGS. 15 and 16.

Although the embodiments discussed above preferably utilize a lightsource which produces visible light, it will be apparent to thoseskilled in the art that other frequencies of light which are not in thevisible spectrum can also be used. For example, cameras are availablewhich operate in the infrared spectrum. By using infrared light insteadof visible light, some sources of noise can be eliminated so thatplacing the FDI system in an enclosure may be unnecessary. It is alsopossible to use other frequencies of light to analyze only the textureof the fabric rather than the color. For example, where the fabric beinginspected contains a printed pattern, it is more beneficial to look atthe texture of the fabric rather than the color. In this case, it isdesirable to use a frequency of light, or a range of frequencies oflight, which allow the color of the fabric to be ignored. Therefore, thepresent invention is not limited to using any particular frequency oflight. Similarly, the present invention is not limited to using anyparticular type of image sensor for obtaining an image of the fabric orto any particular physical arrangement for disposing the image sensor inproximity to the fabric for reading the image. It will be apparent tothose skilled in the art that virtually any type of image sensor, lightsource and means for locating the image sensor and light source alongthe loom can be used as long as a satisfactory image of the fabric beinginspected can be obtained. Furthermore, the present invention is notlimited to inspecting any particular types of fabric or to anyparticular type of fabric manufacturing process. For example, the FDIsystem of the present invention is suitable for inspection of griegefabrics, and fabrics manufactured by other methods, such as warpknitting, circular knitting, etc.

The processing of the image of the fabric to detect and identify defectswill now be discussed with respect to FIGS. 18-22. FIG. 18 is a blockdiagram of the FDI system of the present invention in accordance withthe preferred embodiment. The system works in two hierarchial levels.The first level is the gross filter stage 32 which detects the presenceof the fault or defect. The gross filter stage 32 consists of fractalscanning 33, vertical and horizontal averaging 34 and primaryclassification 36 into one of the broad categories of line point andarea defects. Fractal scanning has already been discussed in detailabove. Vertical and horizontal scanning consists of scanning 10 to 15lines at regular intervals and averaging them. Since the FDI process ofthe present invention may be constrained by time limits (e.g., whenbeing implemented on-line), both of the above scanning techniques helpto reduce data and hence processing time. If the gross filter 32 detectsa fault (or possible fault), the processing is handed over to the FWAanalysis which classifies the fault into one of the anticipated faultsor no fault, as the case may be.

The second level is the fine filter stage which utilizes the informationfrom the gross filter stage to identify the defects using the FWA of thepresent invention. The fine filter stage includes wavelet transform 40,fuzzification 41, fuzzy inferencing 42, rule base 43, defectidentification 44, defect declaration 45, off-line learning 46, on-linelearning 47, parameter adjustment 48 and 50A, noise estimation 49 andrectification 51. Rectification closes the loop and, based on the defectthat has been classified, recommends corrective steps that need to betaken to correct the manufacturing process to eliminate the types ofdefects that are occurring. Since all of these elements of the FDIsystem of the present invention have been discussed in detail above, adetailed discussion of them will not be provided here. Attached asAppendix A is a printout of the source code of the present invention inC which controls the software components of the FDI system of thepresent invention shown in FIG. 18.

FIG. 19 is a flow chart of the fractal scanning technique implemented bythe present invention in accordance with the preferred embodiment. Inaccordance with the preferred embodiment, the number of subfractals i inone fractal is 25 and the total number of levels of fractals in thenested hierarchy is also 25. The basic fractal preferably has one of thefour orientations depicted in FIG. 6 and discussed above. Once 25subfractals of the image have been read (i=25), the level of the fractall is incremented by 1. Once 25 subfractals (i=25) in the 25th fractal(l=25) have been scanned, the fractal scanning routine is complete asindicated by the block labeled "Quit" in FIG. 19. The fractal level lonly gets incremented after 25 subfractals in the particular fractalhave been scanned. As long as i has not been incremented to 25, theroutine continues determining the x and y coordinates of the nextsubfractal and reading the corresponding image at those coordinates.After 25 subfractals have been obtained, i.e., i=25, the subfractalcounter is reset to zero and the level of the fractal l is increased byone. It will be apparent to those skilled in the art that the fractalorientation, the number of subfractals contained in the basic fractal,and the maximum fractal level can be selected in accordance with theapplication, virtually without restriction.

FIG. 20 is a flow chart generally illustrating the fuzzification process41, the fuzzy inferencing process 42, the defect identification 44 andthe defect declaration 45. Since these components of the presentinvention have been discussed in detail above, a detailed discussion ofthem will not be provided here. In general, the fuzzification module 41calculates the degree of membership of the features extracted during thewavelet transformation process 40 with templates from the knowledge baseto form fuzzy sets. The fuzzy inferencing engine 42 utilizes if-the adefect has been observed. The degree of similarity between the extractedfeatures and the corresponding template in the knowledge base is thenobtained to determine the type of defect which has occurred.

FIG. 21 is a flow chart of the genetic algorithm utilized by the presentinvention to create the rule base component 43. The genetic algorithm isdiscussed in detail above under the heading "Off-Line Learning Using aGenetic Algorithm".

FIG. 22 is a flow chart of the on-line learning module 47 and theparameter adjustment module 48 shown in FIG. 18. These modules arediscussed in detail above under the heading "On-Line Learning".

In an experiment conducted with the present invention, the FWA algorithmwas tuned to detect and identify the following defects: (1) broken pick;(2) coarse end; (3) double end; (4) end out; (5) harness drop; (6) knot;(7) oily spot; (8) stub; (9) start mark; and (10) woven in waste. Aspace search for values of scale from 0.01 to 0.82 was conducted fordetectability and identifiability and the detectability of all thedefects were found to drop around a scale of 0.02. This is the scale atwhich the texture of the fabric under inspection becomes more dominant.The detectability was found to be fairly uniform over a wide range ofscales from 0.05 to 0.07. Identifiability, on the other hand, variesfrom one defect to another. It was found to be more erratic near thescale of 0.02 and much more uniform in most other regions.

The learning process was implemented on MATLAB for five wavelet scales.The convergence of the objective function is shown in FIG. 23. Thevalues of the scales returned by this optimization were {0.4144, 0.1544,0.6739, 0.7526, 0.2222}.

The defects given here as an example are mispick, misreed, oil spot andslub. These defects are shown in FIG. 24. The corresponding waveletcoefficients for scales of a=0.1544, 0.4144, 0.07526 are labeled c1, c2,c2 and are shown in FIGS. 25, 26, 27 and 28. It is seen that certainwavelet functions are more sensitive to some fault features as comparedto others. The learning mechanism optimizes this for the classificationprocess. Since the textile structure is periodic in nature, it is alsoimportant to avoid scales which respond to the inherent frequencies ofthe fabric.

The results of the experimental run are enumerated in FIG. 29. Thisprovides for the creation of a defect map on the entire length offabric. False Alarm (FA) indicates cases where the algorithm falselydeclared a defect, while the cases in which a defect was detected butincorrectly classified are indicated by False Identification (FI).

Although the present invention has been described with respect toparticular embodiments, it should be apparent to those skilled in theart that the present invention is not limited to those embodiments. Forexample, scanning algorithms other than the preferred algorithmdiscussed above may be suitable for use with the FDI system of thepresent invention. It will also be apparent to those skilled in the artthat, although the preferred transform is the wavelet transform, othertypes of transforms, such as, for example, the Fourier Transform, canalso be used with the FDI system of the present invention depending onthe range of frequencies over which the defects are expected to occur,and depending on whether the signal is stationary or non stationary. Itis desirable to use the wavelet transform or some other type oftransform which provides an analysis which is localized in both thefrequency and time domains where the defects are occurring over a widerange of frequencies or where the input signal is nonstationary. Thewavelet transform merely is the preferred transform because it islocalized in both frequency and time. It should also be clear that theFDI system of the present invention is not limited to detecting defectsin textile fabrics but that it may also be used for detecting andidentifying other types of defects in other types of products ormaterials, e.g., paper, glass, food, metals, lumber, etc.

What is claimed is:
 1. An apparatus for analyzing an image to detect andidentify defects in an object, said apparatus comprising:at least oneimage sensor disposed to capture an image of the object; a light sourcefor projecting light onto the object; means for converting the capturedimage into a digital representation; a storage device for receiving thedigital representation of the image from said means for converting thecaptured image and for storing the digital representation; andprocessing means for processing the digital representation of thecaptured image stored in said storage device, wherein the processingcomprises a convolution operation on the digital representation wherebyone or more wavelets are used to transform the input digital signal intowavelet coefficients thus extracting certain defect feature sets fromthe digital representation, performing fuzzification by calculating thedegree of membership of the extracted feature sets in feature templatesstored in a knowledge base in said storage device in accordance with asimilarity function, generating fuzzy sets from said defect feature setsif their degree of membership exceeds a threshold, and performing fuzzyinferencing with said rules and fuzzy sets to classify the type ofdefect that has occurred.
 2. An apparatus according to claim 1 whereinprior to performing the transformation, a horizontal, a vertical and afractal scanning technique are performed on the digital representationto convert the digital representation into several 1-D digitalrepresentations.
 3. An apparatus according to claim 2 wherein said atleast one image sensor is comprised of two or more CCD array cameras,and wherein each CCD array camera captures an image of a different areaof the object and wherein a defect is determined to exist when a defectis detected in corresponding scan lines of at least two of said CCDarray cameras.
 4. An apparatus according to claim 3 wherein the objectis a fabric comprising one of a griege fabric, a textile fabric beingmanufactured on a loom, a textile fabric being manufactured by warpknitting, and a textile fabric being manufactured on a circular loom. 5.An apparatus according to claim 2 wherein said at least one image sensoris comprised of a line scan camera and wherein a full image of theobject is obtained by producing relative motion between said line scancamera and the object and by accumulating line scans to obtain a fullimage of the object and wherein the full image is then analyzed todetermine whether a defect exists and, if so, the type of defect.
 6. Anapparatus according to claim 5 wherein the object is a fabric comprisingone of a griege fabric a textile fabric, being manufactured on a loom, atextile fabric being manufactured by warp knitting and a textile fabricbeing manufactured on a circular loom.
 7. An apparatus according toclaim 1 wherein said at least one image sensor is comprised of two ormore CCD array cameras, and wherein each CCD array camera captures animage of a different area of the object and wherein a defect isdetermined to exist when a defect is detected in corresponding scanlines of at least two of said CCD array cameras.
 8. An apparatusaccording to claim 1 wherein said at least one image sensor is comprisedof a line scan camera and wherein a full image of the object is obtainedby producing relative motion between said line scan camera and theobject and by accumulating line scans to obtain a full image of theobject and wherein the full image is then analyzed to determine whethera defect exists and, if so, the type of defect.
 9. An apparatusaccording to claim 1 wherein the object is a fabric comprising one of agriege fabric, a textile fabric being manufactured on a loom, a textilefabric being manufactured by warp knitting, and a textile fabric beingmanufactured on a circular loom.
 10. An apparatus according to claim 1wherein said light source produces only infrared light and wherein saidat least one image sensor is an infrared camera.
 11. An apparatusaccording to claim 1 further comprising a light diffuser disposedbetween said light source and the object for controlling the uniformityand intensity of the light being projected onto the object.
 12. A methodfor detecting and identifying defects in an object comprising the stepsof:storing the digital representation of the image in memory;transforming the digital representation by performing a transformationprocess which extracts certain defect feature sets contained in theimage of the object; the transforming step including convolving thedigital representation with a series of wavelets; wherein the resultingwavelet coefficients comprise the defect features; creating fuzzy setsby calculating the degree of membership of the extracted features withstored feature templates according to a similarity function; and usingthe fuzzy sets in a fuzzy inferencing scheme to infer and classifywhether a defect has been detected and, if so, the type of defect thathas occurred; wherein the fuzzy wavelet coefficients are compared withfuzzy sets stored as representative features in a knowledge base fordifferent wavelet scales and for a plurality of anticipated defects andwherein the wavelet scales are selected to maximize detectability andidentifiability measures.
 13. The method of claim 12 wherein the step ofselecting the wavelet scales is accomplished by using a geneticalgorithm.
 14. The method of claim 12 further comprising an on-linelearning process which is accomplished by obtaining statisticalinformation relating to said image and by scaling said image by a factordetermined in accordance with the statistical information.
 15. A methodaccording to claim 12 wherein a horizontal, a vertical and a fractalscanning technique are performed on the digital representation stored inmemory to convert the digital representation into several 1-D digitalrepresentations.
 16. An apparatus for analyzing an image of a fabric todetect and identify defects in the fabric, said apparatus comprising:atleast one image sensor disposed to capture the image of at least part ofthe fabric; a light source for projecting light through the fabric;means for converting the captured image into a 2D digitalrepresentation; a storage device for receiving said 2D digitalrepresentation of the image from said converting means and for storingsaid digital representation; and processing means for processing said 2Ddigital representation of the captured image, said processing meansincluding means for converting said 2D digital representation into atleast one ID scan of the image which is particularly adapted to detectan expected defect type, means for convolving said at least one 1D scanof said image with at least one predetermined wavelet from a firmly ofwavelets to extract certain defect features in the form of waveletcoefficients from said at east one 1D digital representation means forconcerting said wavelet coefficients into fuzzy sets via a similaritytransformation, and means for declaring and classifying defects basedupon said defect features.
 17. An apparatus for analyzing an image asset forth in claim 16, wherein said apparatus further comprises;meansfor preprocessing said image to improve the defect signature contrastwith respect to background noise.
 18. An apparatus for analyzing animage as set forth in claim 16, wherein said apparatus furthercomprises:means for on-line learning which adjusts the defect featuredetection parameters of the apparatus based upon measured variables ofthe process in real time.
 19. An apparatus for analyzing an image as setforth in claim 18, wherein said on-line learning means furtherincludes:means for modifying the wavelet parameters.
 20. An apparatusfor analyzing an image as set forth in claim 18, wherein said on-linelearning means further includes:means for modifying the fuzzy membershipfunction parameters.
 21. An apparatus for analyzing an image as setforth in claim 16, wherein said apparatus further comprises:means foroff-line learning which adjusts one of the detection and classificationparameters of the apparatus based upon the measured variables of theprocess.
 22. An apparatus for analyzing an image as set forth in claim21, wherein said off-line learning means further includes:means formodifying the fuzzy defect rules.
 23. An apparatus for analyzing animage as set forth in claim 16, wherein said apparatus furtherincludes:means for estimating the noise in the image and for adjustingone of the detection and classification parameters of the apparatusbased on the measured noise.
 24. An apparatus for analyzing an image asset forth in claim 16, wherein said means for converting said 2D digitalrepresentation further includes:means for horizontally scanning said 2Ddigital representation which is adapted for sensitivity to fabric warpdefects; means for vertically scanning said 2D digital representationwhich is adapted for sensitivity to fabric filling defects; and meansfor fractal scanning said 2D digital representation which is adapted forsensitivity to fabric area defects.